主题
申请试用 - Trial
函数简介
向欧拉授权平台申请试用授权,无需激活码。返回 JSON 的字段含义与结构同 激活 - Activate。
返回数据格式:
json
{
"EndTime": "2026-03-01 11:40:41.193",
"LicenseType": 3,
"LicenseTypeStr": "月卡",
"Message": "",
"RemainingCount": 0,
"ServerTime": "2025-12-30 11:40:41.132",
"Status": 0,
}| 字段名 | 说明 |
|---|---|
| EndTime | 授权到期时间。 |
| LicenseType | 授权类型:0次卡,1小时卡,2日卡,3月卡,4年卡,5永久卡。 |
| LicenseTypeStr | 授权类型描述。 |
| Message | 提示信息。 |
| RemainingCount | 次卡剩余次数。 |
| ServerTime | 服务器时间。 |
| Status | 激活状态:1成功,0失败。 |
接口名称
TrialDLL调用
long Trial(string userCode, string softCode, string softVersion, string dealerCode);参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| userCode | 字符串 | 用户码。 |
| softCode | 字符串 | 软件码。 |
| softVersion | 字符串 | 软件版本。(用于区分你自己的软件版本信息,未来可用于版本控制,可空) |
| dealerCode | 字符串 | 经销商码。(用于区分你自己的经销商信息,未来可用于版本控制,可空) |
示例
SDK 调用
cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
int ret = ola.Trial("value", "value", "value", "value");csharp
using OLAPlug;
var ola = new OLAPlugServer();
int ret = ola.Trial("value", "value", "value", "value");python
from OLAPlugServer import OLAPlugServer
ola = OLAPlugServer()
ret = ola.Trial("value", "value", "value", "value")java
import com.olaplug.OLAPlugServer;
OLAPlugServer ola = new OLAPlugServer();
int ret = ola.Trial("value", "value", "value", "value");cpp
var ola = com("OlaPlug.OlaSoft")
var ret = ola.Trial("value", "value", "value", "value")vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ret = ola.Trial("value", "value", "value", "value")text
.局部变量 ola, OLAPlug
ola.创建 ()
ret = ola.Trial(“value”, “value”, “value”, “value”)aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var ret = ola.Trial("value", "value", "value", "value");text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
整数 ret = ola.Trial("value", "value", "value", "value")cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
int32_t ret = ola.Trial("value", "value", "value", "value");原生 DLL 调用
cpp
Trial(instance, "value", "value", "value", "value");csharp
using System.Runtime.InteropServices;
using System.Text;
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long Trial(string userCode, string softCode, string softVersion, string dealerCode);
Trial(instance, "value", "value", "value", "value");python
from ctypes import CDLL, c_int, c_int64, create_string_buffer
ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
ola.Trial(instance, "value", "value", "value", "value")返回值
成功返回 JSON 字符串格式的授权结果(结构与激活接口相同);失败返回 0。
注意事项
- 返回的字符串指针需要调用 FreeStringPtr 接口释放内存。
- 用户码、软件码、软件版本与经销商码需与欧拉后台中该软件/试用策略的配置一致。
- 试用次数、时长、是否允许重复申请等以 授权平台当前策略 为准;失败时请关注
Message字段说明。
